const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 9000,
    proxy: {
      // 选项写法
      '/api': {
        target: 'http://127.0.0.1:7001',
        changeOrigin: true
        // rewrite: (path) => path.replace(/^\/api/, '')
      },
      '/public': {
        target: 'http://127.0.0.1:7001',
        changeOrigin: true
        // rewrite: (path) => path.replace(/^\/api/, '')
      }
    },
  },
})
